package com.example.day22.ex05;

public class LambdaDemo {
    public static void main(String[] args) {
        useAddable((x,y)->{
            return x+y;
        });
        useFlyable(s-> System.out.println(s));
        useAddable((x,y)->x+y);
    }
    private static void useFlyable(Flyable f){
        f.fly("hello");
    }
    private static void useAddable(Addable a){
        System.out.println(a.add(10,20));
    }
}
